import request from '@/utils/request'

// 查询售货机配置列表
export function listMachine(query) {
  return request({
    url: '/ddmachine/machine/list',
    method: 'get',
    params: query
  })
}

// 查询售货机配置详细
export function getMachine(id) {
  return request({
    url: '/ddmachine/machine/' + id,
    method: 'get'
  })
}

// 新增售货机配置
export function addMachine(data) {
  return request({
    url: '/ddmachine/machine',
    method: 'post',
    data: data
  })
}

// 修改售货机配置
export function updateMachine(data) {
  return request({
    url: '/ddmachine/machine',
    method: 'put',
    data: data
  })
}
export function updateMachineHdInfo(id) {
  return request({
    url: '/ddmachine/machine/updateHdInfo/' + id,
    method: 'get'
  })
}
// 删除售货机配置
export function delMachine(id) {
  return request({
    url: '/ddmachine/machine/' + id,
    method: 'delete'
  })
}
